package com.neuedu.task.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.neuedu.task.entity.Task;
import com.neuedu.task.service.ITaskService;

@Controller
@RequestMapping("/task")
public class TaskWeb {
	@Autowired
	private ITaskService taskService;
	
	@RequestMapping(value="/list",method=RequestMethod.GET)
	public String list(Model model) {
		List<Task> taskList=taskService.getTaskList(0, 3);
		model.addAttribute("list", taskList);
		return "list";
	}

}
